package com.jin.gulimall.order.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.jin.common.to.es.SeckillOrderTo;
import com.jin.common.utils.PageUtils;
import com.jin.gulimall.order.entity.OrderEntity;
import com.jin.gulimall.order.vo.*;

import java.util.Map;
import java.util.concurrent.ExecutionException;

/**
 * 订单
 *
 * @author shenjin
 * @email shenjin@gmail.com
 * @date 2021-02-23 14:30:04
 */
public interface OrderService extends IService<OrderEntity> {

    PageUtils queryPage(Map<String, Object> params);

    //订单确认页
    OrderConfirmVo orderConfirm() throws ExecutionException, InterruptedException;


    SubmitOrderResponseVo submitOrder(OrderSubmitVo vo);

    OrderEntity orderByOrderSn(String orderSn);

    void closeOrder(OrderEntity orderEntity);

    PayVo getPayByOrderSn(String orderSn);

    PageUtils queryPageWithItem(Map<String, Object> params);

    String handlePayResult(PayAsyncVo vo);

    void createSeckillOrder(SeckillOrderTo seckillOrderTo);
}

